<template>
	<view class="examine">
		<view class="nav">
			<view class="cu-custom" :style="{height: $wanlshop.wanlsys().height + 'px' }">
				<view class="cu-bar fixed flex_sb"
					:style="{ height: $wanlshop.wanlsys().height + 'px', paddingTop: $wanlshop.wanlsys().top + 'px'}">
					<view class="" @tap="$wanlshop.back(1)">
						<text class="wlIcon-fanhui1"></text>
					</view>
					<view class="fb f32 ml38">
						{{shopData.shopname}}
					</view>
					<view @tap="callPhone">
						<u-icon name="kefu-ermai" size="44" color="#4D4D4D"></u-icon>
					</view>
				</view>

			</view>
		</view>
		<view class="top" v-if="shopData.status == 2">
			<image class="imgshz" src="https://img.aibbyp.com/wechat/images/shop-m/info/shz.png" mode=""></image>
			<view class="fb f32 mt20">
				店铺入驻审核中
			</view>
			<view class="tips">
				温馨提示：提交审核后，请重新进入界面，如果长时间未审核通过，请联系客服
			</view>
		</view>
		<view class="top" v-if="shopData.status == 3">
			<image class="imgshz" src="https://img.aibbyp.com/wechat/images/shop-m/info/sb.png" mode=""></image>
			<view class="fb f32 mt20">
				店铺入驻审核失败
			</view>
			<view class="tips error">
				温馨提示：提交审核后，请重新进入界面，如果长时间未审核通过，请联系客服
			</view>
		</view>
		<view class="top" v-if="shopData.status == 5">
			<image class="imgshz" src="https://img.aibbyp.com/wechat/images/shop-m/info/tg.png" mode=""></image>
			<view class="fb f32 mt20">
				店铺入驻审核通过
			</view>
			<view class="tips">
				温馨提示：提交审核后，请重新进入界面，如果长时间未审核通过，请联系客服
			</view>
		</view>
		<view class="bottom">
			<view class="flex_sb marBtm44">
				<view class="c3 f28">
					主体(企业)名称
				</view>
				<view class="c9 f28">
					{{shopData.name}}
				</view>
			</view>
			<view class="flex_sb marBtm44">
				<view class="c3 f28">
					主体证件
				</view>
				<view class="c9 f28">
					{{shopData.number}}
				</view>
			</view>
			<view class="flex_sb marBtm44">
				<view class="c3 f28">
					手机号码
				</view>
				<view class="c9 f28">
					{{shopData.mobile}}
				</view>
			</view>
			<view class="flex_sb marBtm44">
				<view class="c3 f28">
					店铺类型
				</view>
				<view class="c9 f28">
					<text v-if="shopData.state == 0">个人</text>
					<text v-if="shopData.state == 1">产品供应商</text>
					<text v-if="shopData.state == 2">区域服务商</text>
					<text v-if="shopData.state == 3">产品代售</text>
					<text v-if="shopData.state == 4">城市运营商</text>

				</view>
			</view>
			<view class="marBtm44">
				<view class="c3 f28 mb20">
					店铺简介
				</view>
				<view class="c9 f28">
					{{shopData.bio}}
				</view>
			</view>
			<view class="flex_sb marBtm44">
				<view class="c3 f28">
					经营地区
				</view>
				<view class="c9 f28">
					{{shopData.city}}
				</view>
			</view>
			<view class="btn btn11" @click="getVerify">
				刷新状态
			</view>
			<view class="btn" @click="btnModify">
				返回修改
			</view>
			<view class="btn btn3" v-if="shopData.status == 4" @click="goIndex">
				进入好饰商家
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: 3,
				shopData: {},
				status: null,
			}
		},
		onLoad(type) {
			if (type.status) {
				this.status = type.status
			}
			this.getVerify()
		},
		methods: {
		
			btnModify() {
				if (this.status) {
					uni.navigateTo({
						url: '/pages/m-shop/me/account/info/info'
					})
				} else {
					uni.navigateBack({
						delta: 1
					})
				}
			},
			
			// 取消入驻 弃用
			btnCancel() {
				uni.showModal({
					title: '',
					content: '取消入驻后，将终止店铺信息审核 若再次入驻，需重新提交店铺信息 确认取消？',
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				})
			},
			// 通过去首页
			goIndex() {
				uni.navigateTo({
					url: '/pages/m-shop/me/account/info/agreement'
				})
			},
			callPhone() {
				uni.makePhoneCall({

					phoneNumber: '028-83177139',
					success(res) {
						console.log(res, '---<>')
					},
					fail(err) {
						this.$wanlshop.msg('请在手机设置中打开此权限！')
					}
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.examine {
		display: flex;
		flex-direction: column;
		height: 100vh;
	}

	.nav {
		background: #fff;

		.cu-bar {
			padding: 0 32rpx;
			display: flex;
		}

		.search-form {
			text-align: center;
		}
	}

	.top {
		background: #fff;
		padding: 32rpx;
		display: flex;
		flex-direction: column;
		align-items: center;

		.imgshz {
			width: 92rpx;
			height: 92rpx;
		}

		.tips {
			padding: 24rpx;
			font-size: 24rpx;
			color: #5480FB;
			background: #F0F6FF;
			margin-top: 62rpx;
		}

		.error {
			background: #FFEEEE;
			color: #FF0000;
		}
	}

	.bottom {
		flex: 1;
		background: #fff;
		margin-top: 16rpx;
		padding: 40rpx 34rpx;
		position: relative;

		.marBtm44 {
			margin-bottom: 44rpx;
		}

		.btn {
			position: absolute;
			bottom: 80rpx;
			width: calc(100% - 68rpx);
			text-align: center;
			font-family: Source Han Sans, Source Han Sans;
			font-weight: 600;
			padding: 28rpx 0rpx;
			font-size: 36rpx;
			color: #3072F8;
			box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(46, 132, 246, 0.2);
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			border: 2rpx solid #3065FA;
			background: #FAFAFA;
		}

		.btn11 {
			bottom: 220rpx;
		}

		.errorBtn {
			position: absolute;
			bottom: 80rpx;
		}

		.btn2 {
			font-weight: 600;
			font-size: 36rpx;
			flex: 1;
			color: #3065FA;
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			border: 2rpx solid #3065FA;
			text-align: center;
			padding: 28rpx 0;
			width: 324rpx;

		}

		.pir {
			background: linear-gradient(160deg, #2D94F3 0%, #3072F8 100%);
			box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(46, 132, 246, 0.2);
			color: #FFFFFF;
			margin-left: 38rpx;
		}

		.btn3 {
			color: #FFFFFF;
			background: linear-gradient(160deg, #2D94F3 0%, #3072F8 100%);
		}
	}
</style>